package js.element.canvas 
{
	import js.element.HTMLImageElement;
	import js.HTMLCanvasElement;
	/**
	 * ...
	 * @author ...
	 */
	public class CanvasRenderingContext2D 
	{
		
		/**Gets a back reference to the canvas object that the current context derives from.*/
		public var canvas:HTMLCanvasElement;
		/**Gets or sets the current style that is used to fill shapes.*/
		public var fillStyle:Object;
		/**Gets or sets the current font for the context.*/
		public var font:String;
		/**Gets or sets the current alpha or transparency value that is applied to global composite rendering operations. */
		public var globalAlpha:Number;
		/**Gets or sets a value that indicates how source images are drawn onto a destination image. */
		public var globalCompositeOperation:String;
		/**	Gets or sets the current line cap style.*/
		public var lineCap:String;
		/**Gets or sets the type of corner that is created when two lines meet.*/
		public var lineJoin:String;
		/**Gets or sets the current line width, in pixels.*/
		public var lineWidth:int;
		/**Gets or sets the maximum allowed ratio between half of the lineWidth value and the miter length.*/
		public var miterLimit:int;
		/**	Gets or sets the current level of blur that is applied to shadows.*/
		public var shadowBlur:Number;
		/**	Gets or sets the color to use for shadows.*/
		public var shadowColor:String;
		/**	Gets or sets the horizontal distance of a shadow from a shape.*/
		public var shadowOffsetX:int;
		/**	Gets or sets the vertical distance of a shadow from a shape.*/
		public var shadowOffsetY:int;
		/**Gets or sets the current style that is used for strokes of shapes. */
		public var strokeStyle:Object;
		/**	Gets or sets the current anchor point or alignment settings for text in the current context. */
		public var textAlign:String;
		/**	Gets or sets the current settings for the font baseline alignment. */
		public var textBaseline:String;
		
		
		/**Adds points to a path that represents an arc.*/
		public function arc(x:int, y:int, radius, startAngle, endAngle, bAnticlockwise):void
		{
		};
		/**Draws an arc of a fixed radius between two tangents that are defined by the current point in a path and two additional points.*/
		public function arcTo(x1, y1, x2, y2, radius)
		{
		};
		/**	Resets the current path.*/
		public function beginPath(){};
		/**Adds a point to the current subpath by using the specified control points that represent a cubic Bézier curve.*/
		public function bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y){};
		/**Clears the pixels on a CanvasRenderingContext2D object within a given rectangle. */
		public function clearRect(x:int, y:int, fWidth:int, fHeight:int){};
		/**Specifies a new clipping region.*/
		public function clip(){};
		/**Closes the current subpath and starts a new subpath that has a start point that is equal to the end of the closed subpath.*/
		public function closePath(){};
		/**Returns a CanvasImageData object that has dimensions in CSS pixels.*/
		public function createImageData(vCSSWidth, vCSSHeight){};
		/**Creates an object that represents a linear gradient to use in a canvas context. */
		public function createLinearGradient(x0, y0, x1, y1):CanvasGradient{};
		/**	Returns a CanvasPattern object that repeats the specified element in the specified direction.*/
		public function createPattern(image, vRepition){};
		/**Returns an object that represents a radial or circular gradient to use in a canvas context.*/
		public function createRadialGradient(x0, y0, fRadius0, x1, y1, fRadius1){};
		/**	Draws a specified image onto a canvas.
		 * 
		 */
		public function drawImage(Image:HTMLImageElement , vXSrc:Number , vYSrc:Number , vWSrc:Number , vHSrc:Number, vXDest:Number, vYDest:Number , vWDest:Number , vHDest){};
		/**	Fills subpaths by using the current fill style.*/
		public function fill(){};
		/**
		 * Draws a filled rectangle at (x, y) position whose size is determined by width and height.
		 * @param	x	The x axis of the coordinate for the rectangle starting point.
		 * @param	y	The y axis of the coordinate for the rectangle starting point.
		 * @param	fWidth	The rectangle's width.
		 * @param	fHeight	The rectangle's height.
		 */
		public function fillRect(x:Number, y:Number, fWidth:Number, fHeight:Number){};
		/**Renders filled text to the canvas by using the current fill style and font.*/
		public function fillText(text:String, x:Number, y , maxWidth){};
		/** Returns an ICanvasImageData object that represents the pixel data for the specified rectangle on a canvas.
		 * @return {CanvasImageData}
		 */
		public function getImageData (sx, sy, sw, sh):ImageData {};
		/** Determines if the specified point is in the current path.
		 * @return {Boolean}
		 */
		public function isPointInPath (x, y){};
		/**	Adds a new point to a subpath and connects that point to the last point in the subpath by using a straight line.
		 * @param	x	The x axis of the coordinate for the end of the line.
		 * @param	y	The y axis of the coordinate for the end of the line.
		 */
		public function lineTo (x:Number,y:Number):void{};
		/**Returns a CanvasTextMetrics object that contains the width of the specified text.
		 * @return 
		 */
		public function measureText(sText:String):Object{};
		/**	Creates a new subpath by using the specified point
		 * @param	x	The x axis of the point.
		 * @param	y	The y axis of the point.
		 * */
		public function moveTo(x:Number, y:Number):void	{};
		/**	Paints the data from a specified CanvasImageData object onto a canvas. */
		public function putImageData (oImageData, dx, dy, vDirtyX , vDirtyY , vDirtyWidth , vDirtyHeight):void {};
		/**Adds a point to the current subpath by using the specified control points that represent a quadratic Bézier curve.*/
		public function quadraticCurveTo (cpx:Number, cpy:Number, x:Number, y:Number):void { };
		/**Creates a new closed rectangular subpath.*/
		public function rect (x:Number, y:Number, fWidth:Number, fHeight:Number){};
		/**	Returns previously saved CanvasRenderingContext2D path state and attributes.*/
		public function restore (){};
		/**	Rotates the current context coordinates (that is, a transformation matrix).*/
		public function rotate (angle){};
		/**Saves the state of the current context.*/
		public function save (){};
		/**Scales the current context by the specified horizontal (x) and vertical (y) factors. */
		public function scale (x,y){};
		/**Resets the current transformation matrix of the current context back to its default and then multiplies it by the specified matrix. */
		public function setTransform (){};
		/**	Renders the strokes of the current subpath by using the current stroke styles. */
		public function stroke (){};
		/**Creates an outline of the specified rectangle on a canvas by using the current stroke, line width, and join styles.*/
		public function strokeRect (){};
		/**Renders the specified text at the specified position by using the current font and strokeStyle property. */
		public function strokeText (){};
		/**	Modifies the transformation matrix of the current context.*/
		public function transform (){};
		/**	Specifies values to move the origin point in a canvas. */
		public function translate (x,y){};
	

		
	}

}